import request from '@/utils/request'
// import qs from 'qs'
// 获取所有广告列表
export const getAdList = () => {
  return request({
    method: 'GET',
    url: '/front/ad/getAdList'
  })
}
// 新增或者修改广告信息
export const saveOrUpdateAds = data => {
  return request({
    method: 'POST',
    url: '/front/ad/saveOrUpdate',
    data
  })
}
// 根据id获取广告
export const getAdById = params => {
  return request({
    method: 'GET',
    url: '/front/ad/getAdById',
    params
  })
}
// 更新广告状态
export const updateStatus = params => {
  return request({
    method: 'GET',
    url: '/front/ad/updateStatus',
    params
  })
}
// 更新广告状态
export const getAllSpaces = () => {
  return request({
    method: 'GET',
    url: '/front/ad/space/getAllSpaces'
  })
}
